handling exceptions raised inside that transaction. If the creation (start) of
the transaction fails, then t has not been assigned, and in any case no
transaction has been created, so it is wrong to attempt to abort that
(non-existent) transaction.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
def Read(cls, path, *args):
while True:
+ t = cls(path)
try:
- t = cls(path)
v = t.read(*args)
t.commit()
return v
def Write(cls, path, *args, **opts):
while True:
+ t = cls(path)
try:
- t = cls(path)
t.write(*args, **opts)
t.commit()
return
def Remove(cls, path, *args):
while True:
+ t = cls(path)
try:
- t = cls(path)
t.remove(*args)
t.commit()
return
def List(cls, path, *args):
while True:
+ t = cls(path)
try:
- t = cls(path)
v = t.list(*args)
t.commit()
return v
def Gather(cls, path, *args):
while True:
+ t = cls(path)
try:
- t = cls(path)
v = t.gather(*args)
t.commit()
return v
def Store(cls, path, *args):
while True:
+ t = cls(path)
try:
- t = cls(path)
v = t.store(*args)
t.commit()
return v